import { InputType } from '@/utils';

export const searchConfig: PageConfig = {
    items: [
        {
            itemType: 'text',
            modelKey: 'orderNumber',
            elInputProps: {
                placeholder: '请输入订单号'
            },
            columnProps: {
                label: '订单号'
            },
            validFormatType: InputType.NUMERIC_ALPHABET_SYMBOLS
        },
        {
            itemType: 'text',
            modelKey: 'itemCode',
            elInputProps: {
                placeholder: '请输入物料编码'
            },
            columnProps: {
                label: '物料编码'
            },
            validFormatType: InputType.NUMERIC_ALPHABET_SYMBOLS
        },
        {
            itemType: 'text',
            modelKey: 'itemName',
            elInputProps: {
                placeholder: '请输入物料名称'
            },
            columnProps: {
                label: '物料名称'
            }
        },
        {
            itemType: 'select',
            modelKey: 'isPrePlan',
            elSelectProps: {
                placeholder: '请选择计划是否延期',
                options: [
                    { label: '计划提前', value: true },
                    { label: '计划延期', value: false }
                ]
            },
            columnProps: {
                label: '计划延期'
            }
        },
        {
            itemType: 'date',
            modelKey: 'orderDeliveryDate',
            dateRange: true,
            elDatePickerProps: {
                type: 'daterange',
                startPlaceholder: '开始时间',
                rangeSeparator: '-',
                endPlaceholder: '结束时间'
            },
            columnProps: {
                label: '订单交期'
            }
        },
        {
            itemType: 'date',
            modelKey: 'planBeginTime',
            dateRange: true,
            elDatePickerProps: {
                type: 'daterange',
                startPlaceholder: '开始时间',
                rangeSeparator: '-',
                endPlaceholder: '结束时间'
            },
            columnProps: {
                label: '计划开始'
            }
        },
        {
            itemType: 'date',
            modelKey: 'planEndTime',
            dateRange: true,
            elDatePickerProps: {
                type: 'daterange',
                startPlaceholder: '开始时间',
                rangeSeparator: '-',
                endPlaceholder: '结束时间'
            },
            columnProps: {
                label: '计划结束'
            }
        }
    ]
};
